#ifndef __PARSEREXCEPTION_H__
#define __PARSEREXCEPTION_H__

#include <iostream>
#include <exception>

using namespace std;


class ParserException: public exception {

protected:

	int tipo;
	char* mensaje;
	string detalle;

public: 

	static const int WARNING = 0;
	static const int ERROR	 = 1;

	ParserException() { }
	~ParserException() { }

	/*
	* Implementacion del metodo what() de <exception>. 
	* Returns a null terminated character sequence containing a generic description of the exception.
	* Both the wording of such description and the character width are implementation-defined.
	*/
	virtual const char* what() const throw(...) {
		return this->mensaje;
	}

	/*
	* Devuelve el tipo de excepcion de parseo.
	*/
	int getTipo() {
		return this->tipo;
	}

	/*
	* Devuelve un detalle de la excepcion.
	*/
	string getDetalle() {
		return this->detalle;
	}

};

#endif